<template>
  <el-config-provider :locale="cn">
    <router-view />
  </el-config-provider>
</template>
<script lang="ts" setup>
import cn from 'element-plus/dist/locale/zh-cn.mjs';
document.addEventListener('custom', e => {
  console.log('触发了自定义事件', e);
});
</script>
<style lang="less">
* {
  padding: 0;
  margin: 0;
}

body {
  background: #e8f1ff;
  user-select: none;
  --el-border-radius-base: 2px;
}

ul,
li {
  list-style: none;
}

input[type='range'] {
  --size: 20px;
  --color: #409eff;
  cursor: pointer;
  appearance: none;
  background: none;
  overflow: hidden;
  height: var(--size);
}

input[type='range']::-webkit-slider-thumb {
  aspect-ratio: 1;
  appearance: none;
  border-radius: 50%;
  height: var(--size);
  box-shadow: 0 0 0 var(--size) inset var(--color);
  border-image: linear-gradient(90deg, var(--color) 50%, #fff 0) 0 1 /
    calc(calc(var(--size) / 2) - 2px) 100vw/0 calc(100vw + 2px);
}

.css2d-bar-label {
  color: #fff;
  border: 2px solid #409eff;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 12px;
  // 毛玻璃效果
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.2);
}

.el-table {
  --el-table-header-bg-color: var(--el-bg-color-page);
  thead {
    color: var(--el-text-color-primary);
  }
}
.el-card {
  --el-card-border-radius: 10px;
}
</style>
